1. Field of the Invention
The present invention relates to a serial communication circuit, particularly to a communication circuit, which is built in a one-chip microcomputer and performs serial communication between itself and the other microcomputer.
2. Description of Related Art
The present invention relates to a communication circuit, which performs serial communication on the basis of bit formats of the D2B (Domestic Digital Bus) protocol being one kind of HDLC (High level Data Link Control procedures). The D2B protocol is prescribed as TC84(S)86 by IEC (International Electrotechnical Commission). At first, explanation will be made on the bit format of the D2B protocol.
FIG. 1 is a schematic diagram showing formats of a start bit 102 and of a data bit 103 of one bit of transmit signals to be transmitted from the master side to the slave side of the D2B protocol.
As shown in FIG. 1, in the start bit 102 of the D2B protocol, t1 section of "H" level, t2 section of "L" level, t3 section of "L" level, and 14 section of "H" level are arranged from the head side, and the continuous times of the respective sections are defined by the number of clocks. In addition, the number of clocks shown in FIG. 1 is an example, and it is not limited thereto.
Specifically, in the start bit 102, the t1 section is defined for confirming that it continues "1" for a predetermined time, the t2 section that it becomes "0", the t3 section that it continues "0" for a predetermined time, and the t4 section that it becomes "1". Accordingly, the start bit 102 shown in FIG. 1 represents a start of transmission with four sections from the t1 section to the t4 section as a unit.
As shown in FIG. 1, in the D2B protocol, in one bit of the data bit 103, t1 section of "H" level, t2 section of "L" level, t3 section (hatched portion) which is a section of data to be transmitted, and t4 section of "H" lever are arranged, and the continuous times of the respective sections are defined by the number of clocks. In addition, the number of clocks shown in FIG. 1 is an example, and it is not limited thereto.
Specifically, in the data bit 103, the t1 section is defined for confirming that it continues "1" for a predetermined time, the t2 section that it becomes "0", the t3 section for representing a value of "1" or "0" of the data to be transmitted, and the t4 section that it becomes "1". Accordingly, with four sections from the t1 section to the t4 section with a unit, one bit data of "1" or "0" is represented.
As shown in FIG. 1, as an example, the point that the different number of clocks is decided in advance as the continuous times in the respective sections is different from other general protocols.
For example, FIG. 2 is a schematic diagram showing a bit pattern of one bit data which is transmitted through a data transmit route defined by bit formats of "Class B data communication network interface J1850".
Each one-bit data is composed of three areas each being called a Time and obtained by dividing one-bit data into three. In bit, "0", as shown in FIG. 2 by reference numeral 100, both the first Time and the second Time are represented by "H" level, and the third Time by "L" level. In bit. "1", as shown in FIG. 2 by reference numeral 101, the first Time is represented by "H" level, and both the second Time and the third Time by "L" level.
Though not shown in FIG. 2, in this protocol, SOF (Start Of Frame) corresponding to a start bit 103 of the D2B protocol is composed of 6 Times, such as that the first to fourth Times are represented by "H" level and fifth and sixth Times by "L" level. Even the D2B protocol, there is a case that, a signal of one unit, is composed of 4 sections or more.
In any case, in the conventional protocol, a signal of one unit obtained by combining "H" level and "L" level having a predetermined width are defined to represent "0" or "1" of one bit or a predetermined meaning, however, in the D2B protocol, the widths (continuous time) in the respective sections are different from each other, and by making the value of the section of the specific width among them is made "0" or 1", thereby representing "0" or "1" of one bit.
As aforementioned, a serial communication apparatus processing conventional bit formats, J1850, for example, is premised on an assumption of a bit format in which data is transferred in synchronism with a predetermined number of clocks, and in the aforementioned example, for example, control can be performed with 8 clocks as a reference. But, such a control cannot be adapted to such a bit format as the D2B. And in the case where an apparatus is constructed with hardware to the bit format to which a specified number of clocks are allocated in order to define widths of such respective sections, the application of the apparatus is limited because it cannot be adopted to the bit format in which the respective sections have different widths.